import LayoutBase from '../components/LayoutBase'

let routes = [
    {
        path: "/",
        component: LayoutBase,
        meta: {
            title: '首页',
            hidden: true
        },
        redirect: '/dashboard',
        children: [
            {
                path: 'dashboard',
                component: () => import('../views/DashboardView'),
                meta: {
                    title: '仪表盘'
                }
            }
        ]
    },
    {
        path: "/article",
        meta: {
            title: '文章管理',
            icon: ''
        },
        component: LayoutBase,
        children: [
            {
                path: "category",
                meta: {
                    title: '类别管理',
                    icon: ''
                },
                component: () => import('../views/ArticleCategory')
            },
            {

                path: "author",
                meta: {
                    title: "作者管理",
                    icon: ''
                },
                component: () => import('../views/DashboardView')
            },
            {
                path: "publisher",
                meta: {
                    title: '出版管理'
                },
                component: () => import('../views/DashboardView')
            },
        ],
    },
    {
        path: "/system",
        meta: {
            title: '系统管理'
        },
        component: LayoutBase,
        children: [
            {
                path: "avatar",
                meta: {
                    title: "头像管理",
                },
                component: () => import('../views/UserAvatar')
            },
            {
                path: "user",
                meta: {
                    title: '用户管理'
                },
                // redirect: '/user/index',
                children: [
                    {
                        path: "index",
                        meta: {
                            title: "个人中心",
                        },
                        component: () => import('../views/DashboardView')
                    },

                    {
                        path: "friend",
                        meta: {
                            title: "好友管理",
                            hidden: true
                        },
                        component: () => import('../views/DashboardView')
                    },
                ],
            },
            {
                path: "role",
                meta: {
                    title: "角色管理",
                },
                children: [
                    {
                        path: "list",
                        meta: {
                            title: "列表",
                        },
                        component: () => import('../views/DashboardView')
                    },
                    {
                        path: "permission",
                        meta: {
                            title: "权限管理",
                        },
                        component: () => import('../views/DashboardView')
                    },
                ]
            },
            {
                path: "menu",
                meta: {
                    title: '菜单管理'
                }
            },
        ],
    },
    {
        path: '/logout',
        meta: {
            hidden: true
        },
        component: () => import('../components/NotFound'),

    },
    {
        path: '/login',
        meta: {
            hidden: true
        },
        component: () => import('@/views/LoginView'),

    },
    {
        path: '*',
        meta: {
            hidden: true
        },
        component: () => import('../components/NotFound')
    }
]

export default routes;